package com.skynet.app.api.auth.enums;

import lombok.Getter;

/**
 * @author Skynet
 * @date 2017年11月23日 14:10
 */
@Getter
public enum ResultEnum {
    UNKNOWN_ERROR(-1, "卡哇伊，网络异常~"),
    EMAIL_IS_ALREADY_REGISTERED(10, "邮箱已经被注册~"),
    USER_REGISTER_ERROR(11, "用户注册失败~"),
    USER_NOT_FOUND_BY_EMAIL(12, "该邮箱未被注册~"),
    AUTHENTICATION_ERROR(13,"邮箱或密码错误~" ),
    TOKEN_IS_EMPTY(14,"token为空~"),
    TOKEN_PARSE_ERROR(15,"token解析失败~"),
    UPDATE_USER_ERROR(16,"更新用户信息失败~"),
    REGISTER_SUCCESS(17,"注册成功~"),
    LOGIN_SUCCESS(18,"登录成功~"),
    LOGOUT_SUCCESS(19,"注销成功~"),
    RESET_PASSWORD_SUCCESS(20,"重置密码成功~"),
    REQUEST_PASSWORD_SUCCESS(21,"取回密码成功~"),
    MAIL_SEND_ERROR(22,"邮件发送失败~"),
    LOG_RECORD_ERROR(23,"日志记录异常~");

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
